/* 页面进入动画与过渡，仅动画相关，业务样式留在 style.css */

body {
    transition: background-color 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

body.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.container {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.phase {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0s;
}

.phase.active {
    animation: phaseIn 0.5s forwards;
}

@keyframes phaseIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.chart-bar {
    transition: all 0.3s ease;
}

.chart-bar:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
}

.deception-round {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { background-color: #fff0f0; }
    50% { background-color: #ffdddd; }
    100% { background-color: #fff0f0; }
}

/* 按钮交互动画与水波纹 */
button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 结果背景渐变反馈 */
.container {
    transition: background-color 1s ease;
}

.player-winning {
    background: linear-gradient(to bottom, white, #d6f5d6);
}

.ai-winning {
    background: linear-gradient(to bottom, white, #ffe6e6);
}

.tie-game {
    background: linear-gradient(to bottom, white, #e6f3ff);
}

/* 滑块动态背景 */
input[type="range"] {
    transition: all 0.3s;
}

input[type="range"]:hover::-webkit-slider-thumb {
    transform: scale(1.1);
}

/* 减少动态优先，尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

input[type="range"]:hover::-moz-range-thumb {
    transform: scale(1.1);
}


